<template>
  <div>
    <!--组织机构初次展示-->
    <org-list v-if="status=='org-list'" @returnValue="returnValue"></org-list>
    <!--组织机构详情展示-->
    <org-detail v-if="status=='org-detail'" @returnValue="returnValue" :parent-id="parentId" :org-id="orgId"></org-detail>
  </div>
</template>

<script>
  import OrgList from "./OrgList";
  import OrgDetail from "./OrgDetail";
  import OrgBank from "./OrgBank";

  export default {
    name: "OrgMain",
    components: {OrgBank, OrgDetail, OrgList},
    data() {
      return {
        data: [],
        status: 'org-list',
        orgId: null,
        parentId: null
      }
    },
    methods: {
      returnValue(value) {
        this.status = value.status
        this.parentId = value.parentId
        this.orgId = value.orgId
      }
    }
  }
</script>

<style>
  .pay-list .el-tabs--border-card > .el-tabs__header {
    background-color: #E4E8EB;
  }

  .pay-list .el-tabs--border-card {
    border: 0;
  }

  .row-bg {
    height: 50px;
    background-color: #E4E8EB;
    font-size: 12px;
    padding-left: 20px;
  }
</style>
